import request from '@/utils/request'
import { tradeApi } from '@/utils/comm'

// 查询列表
export function listRentCategory(query) {
  return request({
    url: `${tradeApi}/rentCategory/list`,
    method: 'get',
    params: query
  })
}

// 查询详情
export function getRentCategory(id) {
  return request({
    url: `${tradeApi}/rentCategory/` + id,
    method: 'get'
  })
}

// 新增
export function addRentCategory(data) {
  return request({
    url: `${tradeApi}/rentCategory`,
    method: 'post',
    data: data
  })
}

// 修改
export function updateRentCategory(data) {
  return request({
    url: `${tradeApi}/rentCategory`,
    method: 'put',
    data: data
  })
}

// 删除
export function delRentCategory(ids) {
  return request({
    url: `${tradeApi}/rentCategory/` + ids,
    method: 'DELETE',
  })
}

// 查询所有列表
export function rentCategoryAllList(query) {
  return request({
    url: `${tradeApi}/rentCategory/optionSelect`,
    method: 'get',
    params: query
  })
}